﻿using Cofe.Core.Dynamic;
using Cofe.Core.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace Cofe.Core.Implements
{
#if UseDataContractToSerialize
    [DataContract(Name="Item", Namespace=CofeConstants.Namespace)]
#else 
     [XmlRoot(ElementName = "Item", Namespace = CofeConstants.Namespace)]
#endif
    public class CofeItemInfo : CofeSystemInfo, ICofeItemInfo
    {
        #region Constructor

        public CofeItemInfo(IPropertyHost properties, IDynamicPropertyInterfaceProvider[] providers)
            : base(properties, providers)
        {
        }

        public CofeItemInfo(IPropertyHost properties)
            : base(properties)
        {

        }

        protected CofeItemInfo()
            : base()
        {

        }


        #endregion

        #region Methods

      

      
        
        #endregion

        #region Data
        
        #endregion

        #region Public Properties

        [DataMember(Name="Size")]
        public long Length
        {
            get { return Entity.Behaviors.TryGetProperty<Int64>(CofeItemProperties.Length); }
            protected set { Entity.Behaviors.SetProperty(CofeItemProperties.Length, value); }
        }
        
        #endregion


    }
}
